//
//  ResetPasswordViewController.m
//  帮惠Mall
//
//  Created by reew on 2017/9/15.
//  Copyright © 2017年 reew. All rights reserved.
//

#import "ResetPasswordViewController.h"

@interface ResetPasswordViewController ()
@property (weak, nonatomic) IBOutlet UITextField *phoneNum;
@property (weak, nonatomic) IBOutlet UITextField *authCode;
@property (nonatomic,strong) UIButton *btn;
@end

@implementation ResetPasswordViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setUpTextfield];
    self.navigationController.navigationBarHidden = YES;
    // Do any additional setup after loading the view.
}
#pragma mark - 私有方法
- (void)setUpTextfield{
    UILabel *leftLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 80, 45)];
    leftLabel1.text = @"手机号";
    leftLabel1.font = [UIFont systemFontOfSize:18];
    _phoneNum.leftViewMode = UITextFieldViewModeAlways;
    _phoneNum.leftView = leftLabel1;
    
    UILabel *leftLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 80, 45)];
    leftLabel2.text = @"验证码";
    leftLabel2.font = [UIFont systemFontOfSize:18];
    _authCode.leftViewMode = UITextFieldViewModeAlways;
    _authCode.leftView = leftLabel2;
    //右视图
    _btn = [UIButton buttonWithType:UIButtonTypeCustom];
    _btn.frame = CGRectMake(0, 0, 80, 26);
    _btn.layer.borderColor = [UIColor grayColor].CGColor;
    [_btn setTitle:@"获取验证码" forState:UIControlStateNormal];
    [_btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    _btn.titleLabel.font = [UIFont systemFontOfSize:12];
    _btn.layer.cornerRadius = 13;
    _btn.clipsToBounds = YES;
    //btn.layer.shadowColor = [UIColor blackColor].CGColor;
    //btn.layer.shadowOffset = CGSizeMake(1, 1);
    //btn.layer.shadowOpacity = 0.8;
    //btn.layer.shadowColor = [UIColor blackColor].CGColor;
    _authCode.rightViewMode = UITextFieldViewModeAlways;
    _authCode.rightView = _btn;
    [_btn addTarget:self action:(@selector(getcode)) forControlEvents:UIControlEventTouchUpInside];
}
- (void) getcode{
    [_btn setTitle:@"已发送" forState:UIControlStateNormal];
}
- (IBAction)close:(UIButton *)sender {
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
